package com.sunday.common.mongo.study.aggregate;

import com.sunday.common.core.gson.GsonUtils;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.List;

@Data
public class UserPermissionsDTO {

    @Id
    private Long id;

    @Field("permissions")
    private List<Permissions> permissions;

    @Override
    public String toString() {
        return GsonUtils.DEFAULT.toJson(this);
    }
}
